package com.cloud.stream;

import jakarta.annotation.Resource;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.stereotype.Component;

/**
 * MQ生产者类
 *
 * @author yzj
 */
@Component
public class MQProducer {

    @Resource
    private StreamBridge streamBridge;

    /**
     * 消息发送
     */
    public boolean input(String bindingName, Object data) {
        return streamBridge.send(bindingName, data);
    }

}
